﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<mediatheque.Areas.Admin.Models.Book>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AJout de livres
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% Html.RenderPartial("../Oeuvres/Layout/admin_menu"); %>	
<h2>Ajouter un livre</h2>
 <% if (!(ViewData.Equals(""))){%>
    <div class="alert alert-danger"> <%: ViewData["error_message"] %>	</div>
   <% }%>
  
    <form class="form-horizontal" id="add-book-form"  action="/Admin/Books/AddBook" method="post">
        <div class="control-group">
            <label class="control-label">Titre</label>
            <div class="controls">
                <input class="required" type="text" name="titre" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Auteur</label>
            <div class="controls">
               <input  class="required" type="text" name="auteur" />                
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">Date de publication</label>
            <div class="controls">
               <p><input type="text" name = "required date_publication" class="datepicker" /></p>
            </div>
        </div>
         <div class="control-group">
            <label class="control-label">Date d'édition</label>
            <div class="controls">           
                  <p><input type="text" name = "required date_edition" class="datepicker" /></p>     
            </div>
            
        </div>
        <div class="control-group">
            <label class="control-label">Nombre de pages</label>
            <div class="controls">
                <input  class="required" type="text" name="nb_pages" />  
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <button class="btn btn-warning" type="submit">Ajouter</button>
            </div>
        </div>
    </form>

</asp:Content>
